Charlie Veniot 22nd June 2022 at 4:52pm
' BASIC Anywhere Machine program by Charlie Veniot
' Trigonometric functions by Hamid Naderi Yeganeh for "Parrot" at https://www.huffpost.com/entry/mathematical-birds_b_8876904
' Missing parts of functions found at https://www.flerlagetwins.com/2018/04/parrot.html
dim k, a, b, r as double
pi = 3.1415929
screen _newimage(6000, 5750, 21)
k1 = -10000
k2 = 10000
couleur = &hff0000
s = 1
for r = 46 to 49 step 1
gosub a_run
sleep 0.0125
next r
end
a_run:
for k = k1 to k2 step s
a = int(((3*k/20000)+(cos(37*pi*k/10000))^6*sin((k/10000)^7*(3*pi/5))+(9/7)*(cos(37*pi*k/10000))^16*(cos(pi*k/20000))^12*sin(pi*k/10000))*1000)
b = int(((-5/4)*(cos(37*pi*k/10000))^6*cos((k/10000)^7*(3*pi/5))*(1+3*(cos(pi*k/20000)*cos(3*pi*k/20000))^8)+(2/3)*(cos(3*pi*k/200000)*cos(9*pi*k/200000)*cos(9*pi*k/100000))^12)*1000)
circle (3000-a,1000-b), r, couleur
next k
return